<?php

namespace SisesporteAdmin\Controller;
use SisesporteAdmin\Form\EfetivarMatriculaForm;
use Zend\View\Model\ViewModel;

class MatriculaAlunoController extends CrudController {

    public function __construct() {
        $this->entity = "Sisesporte\Entity\MatriculaAluno";
        $this->form = "SisesporteAdmin\Form\MatriculaAlunoForm";
        $this->service = "Sisesporte\Service\MatriculaAlunoService";
        $this->controller = "matricula-aluno";
        $this->route = "sisesporte-admin";
    }


    public function indexAction() {
        $data = $this->getEm()
        ->getRepository("Sisesporte\Entity\Turma")->findAll();
        return new ViewModel(array('data' => $data, 'flashMessenger' => $this->flashMessenger()->getMessages()));
    }

    public function efetivarMatriculaAction(){
        $form = new EfetivarMatriculaForm(NULL, $this->getEm());
        return new ViewModel(array('form' => $form));
    }
    public function efetivacaoMatriculaAction(){
       // $form = new EfetivarMatriculaForm(NULL, $this->getEm());
       // return new ViewModel(array('form' => $form));
    }


}
